010221f8cf00b39fcb0f475cdd08f8d71301edb9,test/web/org/codehaus/groovy/grails/web/metaclass/TagLibMetaClassTests.java,TagLibMetaClassTests,testInvokeOneTagLibFromOther,#,24
Before Change
"attrs.remove('test')" +
"}\n" +
"}" );
Class tagLibClass2 = gcl.parseClass( "class SecondTagLib {\n" +
"@Property secondTag = { attrs ->\n" +
"firstTag(attrs)\n" +
"}\n" +
"}" );
GrailsApplicationAttributes attrs = getAttributesForClasses(new Class[]{controllerClass,tagLibClass1,tagLibClass2},gcl);
assertNotNull(attrs);
After Change
public void testInvokeOneTagLibFromOther() throws Exception {
GroovyClassLoader gcl = new GroovyClassLoader();
gcl.parseClass( "class TestController {\n" +
"@Property list = {\n" +
"}\n" +
"}\n" +
"class FirstTagLib {\n" +
"@Property firstTag = { attrs ->\n" +
"attrs.remove('test')" +
"}\n" +
"}\n" +
"class SecondTagLib {\n" +
"@Property secondTag = { attrs ->\n" +
"firstTag(attrs)\n" +
"}\n" +
"}" );
GrailsApplicationAttributes attrs = getAttributesForClasses(gcl.getLoadedClasses(),gcl);
assertNotNull(attrs);